package cn.blog.util;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * 写入response的工具类
 * 项目名：blog
 * 创建人：君忆zm
 * 创建时间：2019/10/22-11:38
 */
public class ResponseUtil {
    public static void write(HttpServletResponse response,Object o) throws Exception {
        response.setContentType("text/html;chsrset=utf-8");
        PrintWriter out = response.getWriter();
        out.println(o.toString());
        out.flush();
        out.close();
    }
}
